package com.pxmeta.party.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.pxmeta.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * <p>
 * 公会
 * </p>
 *
 * @author wcl
 * @since 2023-02-05
 */
@TableName("kt_association")
@ApiModel(value = "公会", description = "公会表")
@Data
public class Association implements Serializable {

    @ApiModelProperty("主键")
    @TableId(type = IdType.AUTO)
    private Long id;

    @ApiModelProperty("公会名称")
    private String name;

    @ApiModelProperty("公会头像")
    private String avatar;

    @ApiModelProperty("公会等级")
    private Integer level;

    @ApiModelProperty("简介")
    private String intro;

    @ApiModelProperty("分佣比例")
    private BigDecimal commissionRatio;

    @ApiModelProperty(value = "房间id列表")
    private String partyIds;

    @ApiModelProperty(value = "公会房间id")
    private String partyId;

    @ApiModelProperty(value = "是否删除")
    @TableLogic(delval = "1",value = "0")
    private Integer isDel;

    @ApiModelProperty(value = "类型：0官方，1普通")
    private Integer type;

    @ApiModelProperty("公会会长id")
    private Long presidentUserId;

    @ApiModelProperty(value = "公会长账号")
    @TableField(exist = false)
    private String presidentAccount;

    @ApiModelProperty(value = "公会总流水")
    @TableField(exist = false)
    private Double totalNumber;

    @ApiModelProperty("创建时间")
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime createTime;

    @ApiModelProperty("修改时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime updateTime;
}
